package com.mall.system.feign;

import com.mall.common.entity.gateway.GatewayLog;
import com.mall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 日志服务Feign客户端
 */
@FeignClient(contextId = "logServiceFeignClient", name = "mall-system", path = "/system/logs", fallback = LogServiceFeignClientFallback.class)
public interface LogServiceFeignClient {
    
    /**
     * 保存网关日志
     * 
     * @param gatewayLog 网关日志
     * @return 是否保存成功
     */
    @PostMapping("/gateway")
    Result<Boolean> saveGatewayLog(@RequestBody GatewayLog gatewayLog);
}